<?php
/**
 * Created by IDEA.
 * User: dinesh
 * Date: Aug 12, 2013
 * Time: 11:25:38 AM
 * To change this template use File | Settings | File Templates.
 */
require('libraries/fpdf17/fpdf.php');
class PDF extends FPDF {


    public function __construct($orientation = 'P', $unit = 'mm', $size = 'Letter') {
        parent::__construct($orientation, $unit, $size);
    }

    // Page header
    function Header() {
        // Logo
        $this->Image('images/app/logo_icon.png', 100, 10, 10);
        // Arial bold 15
        $this->SetFont('Arial', 'B', 15);
        $this->Ln(3);
        // Move to the right
        $this->Cell(10);
        // Title
        $this->Cell(170, 20, 'Atomic Energy Authority, Sri Lanka', 0, 1, 'C');
        // Line break
        $this->Ln(5);
    }

// Page footer
    function Footer() {
        // Position at 1.5 cm from bottom
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
